Skip to content

feat(firestore): global option to turn on implicit orderby#2337

Merged
wu-hui merged 2 commits intomainfrom
feat-implicit-orderby
Mar 17, 2026
Merged

feat(firestore): global option to turn on implicit orderby#2337
wu-hui merged 2 commits intomainfrom
feat-implicit-orderby

Conversation

@wu-hui
Copy link
Contributor

@wu-hui wu-hui commented Mar 9, 2026

Introduces a new global option alwaysUseImplicitOrderBy in FirestoreOptions to control whether implicit order bys (e.g. for inequality queries) are sent to the backend. By default, it is false (meaning the SDK only sends explicit order bys). Enterprise users can opt-in to always send them by setting this new option to true to mimic Standard tier behavior.

Related modifications:

  • Added alwaysUseImplicitOrderBy to FirestoreOptions.
  • Query.java handles this serialization flag to send implicit orders for fields with inequalities.
  • Watch.java was updated to always send implicit orders for streaming, regardless of the flag.
  • Added comprehensive unit tests and integration tests.

@wu-hui wu-hui requested a review from a team as a code owner March 9, 2026 20:22
@product-auto-label product-auto-label bot added size: m Pull request size is medium. api: firestore Issues related to the googleapis/java-firestore API. labels Mar 9, 2026
@wu-hui wu-hui force-pushed the feat-implicit-orderby branch from a855d28 to 84bc5f2 Compare March 9, 2026 20:32
@wu-hui wu-hui requested a review from MarkDuckworth March 9, 2026 21:10
Copy link
Contributor

@MarkDuckworth MarkDuckworth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. The JavaDoc comment on the setting could use a little cleanup for readabiliy, but looks good

@wu-hui wu-hui force-pushed the feat-implicit-orderby branch from 84bc5f2 to 488db23 Compare March 17, 2026 13:47
@wu-hui
Copy link
Contributor Author

wu-hui commented Mar 17, 2026

Improved the JavaDoc readability for in as requested.

@wu-hui
Copy link
Contributor Author

wu-hui commented Mar 17, 2026

Improved the JavaDoc readability for setAlwaysUseImplicitOrderBy in FirestoreOptions.java as requested.

@wu-hui wu-hui force-pushed the feat-implicit-orderby branch from 488db23 to 27db8ca Compare March 17, 2026 13:57
@wu-hui wu-hui force-pushed the feat-implicit-orderby branch from dbdc2ac to 979aead Compare March 17, 2026 15:24
@product-auto-label product-auto-label bot added size: l Pull request size is large. and removed size: m Pull request size is medium. labels Mar 17, 2026
@wu-hui wu-hui closed this Mar 17, 2026
@wu-hui wu-hui reopened this Mar 17, 2026
@wu-hui wu-hui added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Mar 17, 2026
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Mar 17, 2026
@wu-hui wu-hui merged commit 24d3e17 into main Mar 17, 2026
45 checks passed
@wu-hui wu-hui deleted the feat-implicit-orderby branch March 17, 2026 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: firestore Issues related to the googleapis/java-firestore API. size: l Pull request size is large.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants